<nav class="navbar navbar-inverse">
  <div class="container">
    <!-- Brand and toggle get grouped for better mobile display -->
    <div class="navbar-header">
      <button type="button" class="navbar-toggle collapsed" data-toggle="collapse" data-target="#bs-example-navbar-collapse-1" aria-expanded="false">
        <span class="sr-only">Toggle navigation</span>
        <span class="icon-bar"></span>
        <span class="icon-bar"></span>
        <span class="icon-bar"></span>
      </button>
      <a class="navbar-brand" href="#">Express</a>
    </div>
    <!-- Collect the nav links, forms, and other content for toggling -->
    <div class="collapse navbar-collapse" id="bs-example-navbar-collapse-1">
      <ul class="nav navbar-nav">
        <li class="<%= title=="index" ?"active":"" %>"><a href="/">首页</a></li>

        <li class="<%= title=="movie" ?"active":"" %>"><a href="/movie">电影频道</a></li>

        <li class="<%= title=="music" ?"active":"" %>"><a href="/music">音乐频道</a></li>

        <li class="<%= title=="book" ?"active":"" %>"><a href="/book">图书频道</a></li>
      </ul>      
      <ul class="nav navbar-nav navbar-right">
        <% if (email){ %>
            <li class="dropdown">
              <a href="#" class="dropdown-toggle" data-toggle="dropdown" role="button" aria-haspopup="true" aria-expanded="false">你好,<%= email %><span class="caret"></span></a>
              <ul class="dropdown-menu">
                <li><a href="#">我的信息</a></li>
                <li><a href="#">我的收藏</a></li>
                <li><a href="#">设置</a></li>
                <li role="separator" class="divider"></li>
                <li><a href="/logout" style="color:black">退出</a></li>
              </ul>
            </li>
        <% } else { %>
              <li class="<%= title=="登陆" ?"active":"" %>"><a href="/login">登陆</a></li>
              <li class="<%= title=="注册" ?"active":"" %>"><a href="/register">注册</a></li>
        <% } %>        
      </ul>
    </div><!-- /.navbar-collapse -->
  </div><!-- /.container-fluid -->
</nav>